import numpy as np

z = np.arange(8)
print(z)
z1 = z.reshape(2,4)
print(z1)
z2 = z1.transpose (1,0)
print(z2)
z3 = z2.reshape(8,)
print(z3)
